\(\int \frac {x (a+b \log (c x^n))}{(d+e x)^4} \, dx\) [57]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 117 \[ \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx=-\frac {b n}{6 e^2 (d+e x)^2}+\frac {b n}{6 d e^2 (d+e x)}+\frac {b n \log (x)}{6 d^2 e^2}+\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-\frac {b n \log (d+e x)}{6 d^2 e^2} \]

[Out]

-1/6*b*n/e^2/(e*x+d)^2+1/6*b*n/d/e^2/(e*x+d)+1/6*b*n*ln(x)/d^2/e^2+1/3*d*(a+b*ln(c*x^n))/e^2/(e*x+d)^3+1/2*(-a
-b*ln(c*x^n))/e^2/(e*x+d)^2-1/6*b*n*ln(e*x+d)/d^2/e^2

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.211, Rules used = {45, 2382, 12, 78} \[ \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx=-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}+\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}+\frac {b n \log (x)}{6 d^2 e^2}-\frac {b n \log (d+e x)}{6 d^2 e^2}+\frac {b n}{6 d e^2 (d+e x)}-\frac {b n}{6 e^2 (d+e x)^2} \]

[In]

Int[(x*(a + b*Log[c*x^n]))/(d + e*x)^4,x]

[Out]

-1/6*(b*n)/(e^2*(d + e*x)^2) + (b*n)/(6*d*e^2*(d + e*x)) + (b*n*Log[x])/(6*d^2*e^2) + (d*(a + b*Log[c*x^n]))/(
3*e^2*(d + e*x)^3) - (a + b*Log[c*x^n])/(2*e^2*(d + e*x)^2) - (b*n*Log[d + e*x])/(6*d^2*e^2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 2382

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_))^(q_), x_Symbol] :> With[{u = IntHide[
x^m*(d + e*x)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]] /; FreeQ
[{a, b, c, d, e, n}, x] && ILtQ[m + q + 2, 0] && IGtQ[m, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-(b n) \int \frac {-d-3 e x}{6 e^2 x (d+e x)^3} \, dx \\ & = \frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-\frac {(b n) \int \frac {-d-3 e x}{x (d+e x)^3} \, dx}{6 e^2} \\ & = \frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-\frac {(b n) \int \left (-\frac {1}{d^2 x}-\frac {2 e}{(d+e x)^3}+\frac {e}{d (d+e x)^2}+\frac {e}{d^2 (d+e x)}\right ) \, dx}{6 e^2} \\ & = -\frac {b n}{6 e^2 (d+e x)^2}+\frac {b n}{6 d e^2 (d+e x)}+\frac {b n \log (x)}{6 d^2 e^2}+\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-\frac {b n \log (d+e x)}{6 d^2 e^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.15 \[ \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx=\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-\frac {b n \left (\frac {1}{(d+e x)^2}+\frac {2}{d (d+e x)}+\frac {2 \log (x)}{d^2}-\frac {2 \log (d+e x)}{d^2}\right )}{6 e^2}+\frac {b n \left (\frac {1}{d (d+e x)}+\frac {\log (x)}{d^2}-\frac {\log (d+e x)}{d^2}\right )}{2 e^2} \]

[In]

Integrate[(x*(a + b*Log[c*x^n]))/(d + e*x)^4,x]

[Out]

(d*(a + b*Log[c*x^n]))/(3*e^2*(d + e*x)^3) - (a + b*Log[c*x^n])/(2*e^2*(d + e*x)^2) - (b*n*((d + e*x)^(-2) + 2
/(d*(d + e*x)) + (2*Log[x])/d^2 - (2*Log[d + e*x])/d^2))/(6*e^2) + (b*n*(1/(d*(d + e*x)) + Log[x]/d^2 - Log[d
+ e*x]/d^2))/(2*e^2)

Maple [A] (verified)

Time = 0.51 (sec) , antiderivative size = 205, normalized size of antiderivative = 1.75

method result size
parallelrisch \(\frac {-3 x \ln \left (c \,x^{n}\right ) b \,d^{3} e^{2}+x b \,d^{3} e^{2} n +x^{2} b \,d^{2} e^{3} n +\ln \left (x \right ) b \,d^{4} e n -\ln \left (e x +d \right ) b \,d^{4} e n -\ln \left (c \,x^{n}\right ) b \,d^{4} e +3 x^{2} a \,d^{2} e^{3}+x^{3} a d \,e^{4}+3 \ln \left (x \right ) x b \,d^{3} e^{2} n -3 \ln \left (e x +d \right ) x b \,d^{3} e^{2} n +\ln \left (x \right ) x^{3} b d \,e^{4} n -\ln \left (e x +d \right ) x^{3} b d \,e^{4} n +3 \ln \left (x \right ) x^{2} b \,d^{2} e^{3} n -3 \ln \left (e x +d \right ) x^{2} b \,d^{2} e^{3} n}{6 d^{3} e^{3} \left (e x +d \right )^{3}}\) \(205\)
risch \(-\frac {b \left (3 e x +d \right ) \ln \left (x^{n}\right )}{6 \left (e x +d \right )^{3} e^{2}}-\frac {3 i \pi b \,d^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} e x +i \pi b \,d^{3} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b \,d^{3} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )-3 i \pi b \,d^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) e x +3 i \pi b \,d^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} e x -3 i \pi b \,d^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3} e x +i \pi b \,d^{3} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b \,d^{3} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}-2 \ln \left (-x \right ) b \,e^{3} n \,x^{3}+2 \ln \left (e x +d \right ) b \,e^{3} n \,x^{3}-6 \ln \left (-x \right ) b d \,e^{2} n \,x^{2}+6 \ln \left (e x +d \right ) b d \,e^{2} n \,x^{2}-6 \ln \left (-x \right ) b \,d^{2} e n x +6 \ln \left (e x +d \right ) b \,d^{2} e n x -2 b d \,e^{2} n \,x^{2}+6 \ln \left (c \right ) b \,d^{2} e x -2 \ln \left (-x \right ) b \,d^{3} n +2 \ln \left (e x +d \right ) b \,d^{3} n -2 b \,d^{2} e n x +2 d^{3} b \ln \left (c \right )+6 a \,d^{2} e x +2 a \,d^{3}}{12 e^{2} d^{2} \left (e x +d \right )^{3}}\) \(403\)

[In]

int(x*(a+b*ln(c*x^n))/(e*x+d)^4,x,method=_RETURNVERBOSE)

[Out]

1/6*(-3*x*ln(c*x^n)*b*d^3*e^2+x*b*d^3*e^2*n+x^2*b*d^2*e^3*n+ln(x)*b*d^4*e*n-ln(e*x+d)*b*d^4*e*n-ln(c*x^n)*b*d^
4*e+3*x^2*a*d^2*e^3+x^3*a*d*e^4+3*ln(x)*x*b*d^3*e^2*n-3*ln(e*x+d)*x*b*d^3*e^2*n+ln(x)*x^3*b*d*e^4*n-ln(e*x+d)*
x^3*b*d*e^4*n+3*ln(x)*x^2*b*d^2*e^3*n-3*ln(e*x+d)*x^2*b*d^2*e^3*n)/d^3/e^3/(e*x+d)^3

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.38 \[ \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx=\frac {b d e^{2} n x^{2} - a d^{3} + {\left (b d^{2} e n - 3 \, a d^{2} e\right )} x - {\left (b e^{3} n x^{3} + 3 \, b d e^{2} n x^{2} + 3 \, b d^{2} e n x + b d^{3} n\right )} \log \left (e x + d\right ) - {\left (3 \, b d^{2} e x + b d^{3}\right )} \log \left (c\right ) + {\left (b e^{3} n x^{3} + 3 \, b d e^{2} n x^{2}\right )} \log \left (x\right )}{6 \, {\left (d^{2} e^{5} x^{3} + 3 \, d^{3} e^{4} x^{2} + 3 \, d^{4} e^{3} x + d^{5} e^{2}\right )}} \]

[In]

integrate(x*(a+b*log(c*x^n))/(e*x+d)^4,x, algorithm="fricas")

[Out]

1/6*(b*d*e^2*n*x^2 - a*d^3 + (b*d^2*e*n - 3*a*d^2*e)*x - (b*e^3*n*x^3 + 3*b*d*e^2*n*x^2 + 3*b*d^2*e*n*x + b*d^
3*n)*log(e*x + d) - (3*b*d^2*e*x + b*d^3)*log(c) + (b*e^3*n*x^3 + 3*b*d*e^2*n*x^2)*log(x))/(d^2*e^5*x^3 + 3*d^
3*e^4*x^2 + 3*d^4*e^3*x + d^5*e^2)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 661 vs. \(2 (112) = 224\).

Time = 5.32 (sec) , antiderivative size = 661, normalized size of antiderivative = 5.65 \[ \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx=\begin {cases} \tilde {\infty } \left (- \frac {a}{2 x^{2}} - \frac {b n}{4 x^{2}} - \frac {b \log {\left (c x^{n} \right )}}{2 x^{2}}\right ) & \text {for}\: d = 0 \wedge e = 0 \\\frac {\frac {a x^{2}}{2} - \frac {b n x^{2}}{4} + \frac {b x^{2} \log {\left (c x^{n} \right )}}{2}}{d^{4}} & \text {for}\: e = 0 \\\frac {- \frac {a}{2 x^{2}} - \frac {b n}{4 x^{2}} - \frac {b \log {\left (c x^{n} \right )}}{2 x^{2}}}{e^{4}} & \text {for}\: d = 0 \\- \frac {a d^{3}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} - \frac {3 a d^{2} e x}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} - \frac {b d^{3} n \log {\left (\frac {d}{e} + x \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} - \frac {3 b d^{2} e n x \log {\left (\frac {d}{e} + x \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} + \frac {b d^{2} e n x}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} - \frac {3 b d e^{2} n x^{2} \log {\left (\frac {d}{e} + x \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} + \frac {b d e^{2} n x^{2}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} + \frac {3 b d e^{2} x^{2} \log {\left (c x^{n} \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} - \frac {b e^{3} n x^{3} \log {\left (\frac {d}{e} + x \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} + \frac {b e^{3} x^{3} \log {\left (c x^{n} \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} & \text {otherwise} \end {cases} \]

[In]

integrate(x*(a+b*ln(c*x**n))/(e*x+d)**4,x)

[Out]

Piecewise((zoo*(-a/(2*x**2) - b*n/(4*x**2) - b*log(c*x**n)/(2*x**2)), Eq(d, 0) & Eq(e, 0)), ((a*x**2/2 - b*n*x
**2/4 + b*x**2*log(c*x**n)/2)/d**4, Eq(e, 0)), ((-a/(2*x**2) - b*n/(4*x**2) - b*log(c*x**n)/(2*x**2))/e**4, Eq
(d, 0)), (-a*d**3/(6*d**5*e**2 + 18*d**4*e**3*x + 18*d**3*e**4*x**2 + 6*d**2*e**5*x**3) - 3*a*d**2*e*x/(6*d**5
*e**2 + 18*d**4*e**3*x + 18*d**3*e**4*x**2 + 6*d**2*e**5*x**3) - b*d**3*n*log(d/e + x)/(6*d**5*e**2 + 18*d**4*
e**3*x + 18*d**3*e**4*x**2 + 6*d**2*e**5*x**3) - 3*b*d**2*e*n*x*log(d/e + x)/(6*d**5*e**2 + 18*d**4*e**3*x + 1
8*d**3*e**4*x**2 + 6*d**2*e**5*x**3) + b*d**2*e*n*x/(6*d**5*e**2 + 18*d**4*e**3*x + 18*d**3*e**4*x**2 + 6*d**2
*e**5*x**3) - 3*b*d*e**2*n*x**2*log(d/e + x)/(6*d**5*e**2 + 18*d**4*e**3*x + 18*d**3*e**4*x**2 + 6*d**2*e**5*x
**3) + b*d*e**2*n*x**2/(6*d**5*e**2 + 18*d**4*e**3*x + 18*d**3*e**4*x**2 + 6*d**2*e**5*x**3) + 3*b*d*e**2*x**2
*log(c*x**n)/(6*d**5*e**2 + 18*d**4*e**3*x + 18*d**3*e**4*x**2 + 6*d**2*e**5*x**3) - b*e**3*n*x**3*log(d/e + x
)/(6*d**5*e**2 + 18*d**4*e**3*x + 18*d**3*e**4*x**2 + 6*d**2*e**5*x**3) + b*e**3*x**3*log(c*x**n)/(6*d**5*e**2
 + 18*d**4*e**3*x + 18*d**3*e**4*x**2 + 6*d**2*e**5*x**3), True))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.28 \[ \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx=\frac {1}{6} \, b n {\left (\frac {x}{d e^{3} x^{2} + 2 \, d^{2} e^{2} x + d^{3} e} - \frac {\log \left (e x + d\right )}{d^{2} e^{2}} + \frac {\log \left (x\right )}{d^{2} e^{2}}\right )} - \frac {{\left (3 \, e x + d\right )} b \log \left (c x^{n}\right )}{6 \, {\left (e^{5} x^{3} + 3 \, d e^{4} x^{2} + 3 \, d^{2} e^{3} x + d^{3} e^{2}\right )}} - \frac {{\left (3 \, e x + d\right )} a}{6 \, {\left (e^{5} x^{3} + 3 \, d e^{4} x^{2} + 3 \, d^{2} e^{3} x + d^{3} e^{2}\right )}} \]

[In]

integrate(x*(a+b*log(c*x^n))/(e*x+d)^4,x, algorithm="maxima")

[Out]

1/6*b*n*(x/(d*e^3*x^2 + 2*d^2*e^2*x + d^3*e) - log(e*x + d)/(d^2*e^2) + log(x)/(d^2*e^2)) - 1/6*(3*e*x + d)*b*
log(c*x^n)/(e^5*x^3 + 3*d*e^4*x^2 + 3*d^2*e^3*x + d^3*e^2) - 1/6*(3*e*x + d)*a/(e^5*x^3 + 3*d*e^4*x^2 + 3*d^2*
e^3*x + d^3*e^2)

Giac [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.39 \[ \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx=-\frac {{\left (3 \, b e n x + b d n\right )} \log \left (x\right )}{6 \, {\left (e^{5} x^{3} + 3 \, d e^{4} x^{2} + 3 \, d^{2} e^{3} x + d^{3} e^{2}\right )}} + \frac {b e^{2} n x^{2} + b d e n x - 3 \, b d e x \log \left (c\right ) - 3 \, a d e x - b d^{2} \log \left (c\right ) - a d^{2}}{6 \, {\left (d e^{5} x^{3} + 3 \, d^{2} e^{4} x^{2} + 3 \, d^{3} e^{3} x + d^{4} e^{2}\right )}} - \frac {b n \log \left (e x + d\right )}{6 \, d^{2} e^{2}} + \frac {b n \log \left (x\right )}{6 \, d^{2} e^{2}} \]

[In]

integrate(x*(a+b*log(c*x^n))/(e*x+d)^4,x, algorithm="giac")

[Out]

-1/6*(3*b*e*n*x + b*d*n)*log(x)/(e^5*x^3 + 3*d*e^4*x^2 + 3*d^2*e^3*x + d^3*e^2) + 1/6*(b*e^2*n*x^2 + b*d*e*n*x
 - 3*b*d*e*x*log(c) - 3*a*d*e*x - b*d^2*log(c) - a*d^2)/(d*e^5*x^3 + 3*d^2*e^4*x^2 + 3*d^3*e^3*x + d^4*e^2) -
1/6*b*n*log(e*x + d)/(d^2*e^2) + 1/6*b*n*log(x)/(d^2*e^2)

Mupad [B] (verification not implemented)

Time = 0.67 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.21 \[ \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx=-\frac {a\,d+x\,\left (3\,a\,e-b\,e\,n\right )-\frac {b\,e^2\,n\,x^2}{d}}{6\,d^3\,e^2+18\,d^2\,e^3\,x+18\,d\,e^4\,x^2+6\,e^5\,x^3}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {b\,d}{6\,e^2}+\frac {b\,x}{2\,e}\right )}{d^3+3\,d^2\,e\,x+3\,d\,e^2\,x^2+e^3\,x^3}-\frac {b\,n\,\mathrm {atanh}\left (\frac {2\,e\,x}{d}+1\right )}{3\,d^2\,e^2} \]

[In]

int((x*(a + b*log(c*x^n)))/(d + e*x)^4,x)

[Out]

- (a*d + x*(3*a*e - b*e*n) - (b*e^2*n*x^2)/d)/(6*d^3*e^2 + 6*e^5*x^3 + 18*d^2*e^3*x + 18*d*e^4*x^2) - (log(c*x
^n)*((b*d)/(6*e^2) + (b*x)/(2*e)))/(d^3 + e^3*x^3 + 3*d*e^2*x^2 + 3*d^2*e*x) - (b*n*atanh((2*e*x)/d + 1))/(3*d
^2*e^2)